import { myRequest } from './api.js'

// 律师列表
const getLawyerList = async function(params) {
	return await myRequest({url: '/client/lawyer/list', data: params})
}

// 当前登陆用户信息
const getMemberInfo = async function(params) {
	return await myRequest({url: '/client/member/info', data: params})
}

// 绑定手机号
const bindMobile = async function(params) {
	return await myRequest({url: '/client/member/bindMobile', data: params, method: 'POST'})
}

// 投诉建议
const suggest = async function(params) {
	return await myRequest({url: '/client/other/suggest', data: params, method: 'POST'})
}

// 编辑会员（app）
const memberEdit = async function(params) {
	return await myRequest({url: '/client/member/edit', data: params, method: 'POST'})
}

// 获取会员卡
const findCard = async function(params) {
	return await myRequest({url: '/client/visitor/find', data: params})
}

// 查询卡
const findCardVip = async function(params) {
	return await myRequest({url: '/client/card/find', data: params})
}

// 绑定
const wxBindMobile = async function(params) {
	return await myRequest({url: '/client/visitor/bindMobile', data: params, method: 'POST'})
}

// 余额流水
const balanceWater = async function(params) {
	return await myRequest({url: '/client/member/balanceWater', data: params})
}

// 余额充值创建订单
const createBalanceOrder = async function(params) {
	return await myRequest({url: '/client/balance/submit', data: params, method: 'POST'})
}

// 余额充值支付订单
const payBalanceOrder = async function(params) {
	return await myRequest({url: '/client/balance/pay', data: params, method: 'POST'})
}

// 余额充值获取配置
const payBalanceGetSet = async function(params) {
	return await myRequest({url: '/client/visitor/getset', data: params})
}

// 推荐人列表
const recommendList = async function(params) {
	return await myRequest({url: '/client/recommend/list', data: params})
}


export {
	getLawyerList,
	getMemberInfo,
	bindMobile,
	suggest,
	memberEdit,
	findCard,
	wxBindMobile,
	findCardVip,
	balanceWater,
	createBalanceOrder,
	payBalanceOrder,
	payBalanceGetSet,
	recommendList
}